// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'StockId',
        footer: "Foots",
        cnName: '库存盘点',
        name: 'stocktake',
        url: "/stocktake/",
        sortName: "StockId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"StockNo":"","ProductNo":"","ProductName":"","Specifications":"","UnitName":"","WarehouseId":"","StoragebayId":"","LocationId":"","BookInventories":"","PhysicalCount":"","StocktakeDate":"","Auditor":"","VarianceReason":"","StocktakeNumber":""};
    const editFormOptions = [[{"title":"盘点单号","field":"StockNo","type":"text"},
                               {"title":"产品编号","required":true,"field":"ProductNo","type":"text"},
                               {"title":"产品名称","required":true,"field":"ProductName","type":"text"}],
                              [{"dataKey":"规格型号","data":[],"title":"规格型号","required":true,"field":"Specifications","type":"select"},
                               {"dataKey":"单位","data":[],"title":"单位","required":true,"field":"UnitName","type":"select"},
                               {"dataKey":"仓库建模","data":[],"title":"仓库","required":true,"field":"WarehouseId","type":"select"}],
                              [{"dataKey":"库区建模","data":[],"title":"库区\r\n","required":true,"field":"StoragebayId","type":"select"},
                               {"dataKey":"库位建模","data":[],"title":"库位","required":true,"field":"LocationId","type":"select"},
                               {"title":"账面库存数","required":true,"field":"BookInventories","type":"text"}],
                              [{"title":"实际盘点数","required":true,"field":"PhysicalCount","type":"text"},
                               {"title":"盘点时间","required":true,"field":"StocktakeDate","type":"date"},
                               {"dataKey":"客户","data":[],"title":"盘点人","required":true,"field":"Auditor","type":"select"}],
                              [{"title":"差异原因","required":true,"field":"VarianceReason","type":"textarea"},
                               {"title":"盘点数量","required":true,"field":"StocktakeNumber","type":"text"}]];
    const searchFormFields = {"StockNo":"","ProductNo":"","ProductName":"","Specifications":"","UnitName":"","WarehouseId":"","StoragebayId":"","LocationId":"","BookInventories":"","PhysicalCount":"","StocktakeDate":"","Auditor":"","VarianceReason":"","StocktakeNumber":""};
    const searchFormOptions = [[{"title":"盘点单号","field":"StockNo","type":"="},{"title":"产品编号","field":"ProductNo","type":"="},{"title":"产品名称","field":"ProductName","type":"like"}],[{"dataKey":"规格型号","data":[],"title":"规格型号","field":"Specifications","type":"="},{"dataKey":"单位","data":[],"title":"单位","field":"UnitName","type":"="},{"dataKey":"仓库建模","data":[],"title":"仓库","field":"WarehouseId","type":"="}],[{"dataKey":"库区建模","data":[],"title":"库区\r\n","field":"StoragebayId","type":"="},{"dataKey":"库位建模","data":[],"title":"库位","field":"LocationId","type":"="},{"title":"账面库存数","field":"BookInventories","type":"="}],[{"title":"实际盘点数","field":"PhysicalCount","type":"="},{"title":"盘点时间","field":"StocktakeDate","type":"="},{"dataKey":"客户","data":[],"title":"盘点人","field":"Auditor"}],[{"title":"差异原因","field":"VarianceReason","type":"like"},{"title":"盘点数量","field":"StocktakeNumber","type":"="}]];
    const columns = [{field:'StockId',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StockNo',title:'盘点单号',type:'string',width:110,align:'left',sort:true},
                       {field:'ProductNo',title:'产品编号',type:'string',width:110,require:true,align:'left'},
                       {field:'ProductName',title:'产品名称',type:'string',width:110,require:true,align:'left'},
                       {field:'Specifications',title:'规格型号',type:'int',bind:{ key:'规格型号',data:[]},width:110,require:true,align:'left'},
                       {field:'UnitName',title:'单位',type:'int',bind:{ key:'单位',data:[]},width:110,require:true,align:'left'},
                       {field:'WarehouseId',title:'仓库',type:'int',bind:{ key:'仓库建模',data:[]},width:110,require:true,align:'left'},
                       {field:'StoragebayId',title:'库区',type:'int',bind:{ key:'库区建模',data:[]},width:110,require:true,align:'left'},
                       {field:'LocationId',title:'库位',type:'int',bind:{ key:'库位建模',data:[]},width:110,require:true,align:'left'},
                       {field:'BookInventories',title:'账面库存数',type:'int',width:110,require:true,align:'left'},
                       {field:'PhysicalCount',title:'实际盘点数',type:'int',width:110,require:true,align:'left'},
                       {field:'StocktakeDate',title:'盘点时间',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'Auditor',title:'盘点人',type:'string',bind:{ key:'客户',data:[]},width:110,require:true,align:'left'},
                       {field:'VarianceReason',title:'差异原因',type:'string',width:110,require:true,align:'left'},
                       {field:'StocktakeNumber',title:'盘点数量',type:'int',width:110,require:true,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}